// noinspection ES6UnusedImports
// noinspection JSUnusedLocalSymbols

import {describe, expect, it} from "vitest";
import {logJson} from "gs-base";
import {BlobTypes, parseMimeExt} from "gs-data";
import {readFetch, setReadFetchDefault} from "../dist";

const console = (top as any).console;

describe('read', () => {
	console.clear();
	it('default-setting', async (): Promise<void> => {
		setReadFetchDefault({
			cache: 'force-cache',   //优先从缓存加载
			maxSize: 1024 * 1024 * 5    //最大5MB,超过将抛出异常(默认限制为100MB)
		});
		const response = await readFetch('https://aisearch.cdn.bcebos.com/homepage/jump_panel/photo_editing_min_v2/qihuanjianzhu.jpg');
		console.log(response)
	})
})